<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
	document.onkeydown = function(e) {
		key = (e) ? e.keyCode : event.keyCode;
		if (key == 8 || key == 116) {
			if (e) { //표준         
				e.preventDefault();
			} else { //익스용
				event.keyCode = 0;
				event.returnValue = false;
			}
		}
	}
</script>
<c:choose>
<c:when test="${sessionScope.vo.memberlevelinfoVO.member_level_no !=1}">
<script>
	alert("잘못된 접근입니다!");           
	location.href="../../mycinema.do?command=home_main";
</script>
</c:when>
<c:when test="${sessionScope.vo.memberlevelinfoVO.member_level_no ==1}">
<c:choose>
		<c:when test="${requestScope.register=='success'}">
		<font size='3' color='#d2b48c'>영화가 성공적으로 등록되었습니다. </font>
		<a href="admin.do?command=movie_list_admin"><font size='3' color='#d2b48c'>영화목록으로.. </font></a>
		<hr color="#f5f5f5">
		<table width='90%' style='table-layout: fixed' align='center'>
			<tr>
				<td rowspan="9"><img src="img.poster/${requestScope.vo.movie_no}.jpg" width="200"/></td>
				<td><b><font size="3">${requestScope.vo.movie_title}</font></b> <img src="img.grade/${requestScope.vo.movieGradeInfoVO.movie_grade_no}.png"></td>
			</tr>
			<tr>
				<td><b> 감독 </b> ${requestScope.vo.director} </td>
			</tr>		
			<tr>
				<td><b> 출연 </b> ${requestScope.vo.actor}</td>
			</tr>
			<tr>
				<td><B> 등급 </B> 
				<c:choose>
					<c:when test="${requestScope.vo.movieGradeInfoVO.movie_grade==0}">전체 관람가</c:when>
					<c:otherwise>${requestScope.vo.movieGradeInfoVO.movie_grade}세 이상 관람가</c:otherwise>
				</c:choose>
				</td>
			</tr>
			<tr>
				<td><b> 개봉일 </b> ${requestScope.vo.opening_day}</td>
			</tr>	
			<tr>
				<td><b> 러닝타임 </b> ${requestScope.vo.running_time}분</td>
			</tr>
				<tr>
				<td><b> 배급사 </b> ${requestScope.vo.distributor}</td>
			</tr>
			<tr>
				<td><b> 홈페이지 </b> <a href="${requestScope.vo.homepage}" target=_blank>${requestScope.vo.homepage}</a></td>
			</tr>
		</table>
<hr color="#f5f5f5">
		<table width='800' style='table-layout: fixed' align='center'>
			<tr>
				<td><b>synopsis</b><br></td>
			</tr>

			<tr>
				<td>${requestScope.vo.synopsis}</td>
			</tr>
			</table>
			<hr color="#f5f5f5">
			
	</c:when>
	<c:when test="${requestScope.register=='fail'}">
		<script>
			alert("같은 영화가 이미 존재합니다. 영화등록 실패!");
			location.href="../../mycinema.do?command=home_main";	
		</script>
	</c:when>
	<c:otherwise>
		<script>
			alert("잘못된 접근 입니다!");
			location.href="../../mycinema.do?command=home_main";	
		</script>
	</c:otherwise>	
</c:choose>
</c:when>
</c:choose>








